package com.sanadc.shohdi.chapter2.student_report;




public class StudentReport
{
	public void printStudentGrades (Student[] students)
	{
		
		Student student;
		
		
		for (int i=0;i<students.length;i++)
		{
			student = students[i];
			
			
			
			System.out.println("Final grade for : " + student.getName() + " is " + student.getAverage());
			
		}
		
		
		
	}
	
	public static void main(String[] args)
	{
		TestScore test = new TestScore(80);
		TestScore[] testScores = new TestScore[3];
		testScores[0] = test;
		test = new TestScore(90);
		testScores[1] = test;
		test = new TestScore(70);
		testScores[2] = test;
		
		Student newOne = new Student ("Shohdi",testScores);
		Student [] report = new Student[2];
		report[0] = newOne;
		newOne= new Student ("Hussien",testScores);
		
		report[1] = newOne;
		
		StudentReport testReport = new  StudentReport();
		testReport.printStudentGrades(report);
		
	}
	
}